package cn.tedu.nybikeT.pojo;

import java.io.Serializable;

public class AnalyzedCrashDO implements Serializable{

	private static final long serialVersionUID = -4241784719646696360L;
	
	private int crashYear;//事故发生年份
	private int crashMonth;//事故发生月份
	private int crashDay;//事故发生天数
	private double latitude ;//发生纬度
	private double longitude ;//发生经度
	private int injuredNumber;//事故受伤人数
	private int killedNumber;//事故死亡人数
	private double dangerIndex;//事故危险系数
	
	public AnalyzedCrashDO() {
		super();
		// TODO Auto-generated constructor stub
	}

	public AnalyzedCrashDO(int crashYear, int crashMonth, int crashDay, double latitude, double longitude,
			int injuredNumber, int killedNumber, double dangerIndex) {
		super();
		this.crashYear = crashYear;
		this.crashMonth = crashMonth;
		this.crashDay = crashDay;
		this.latitude = latitude;
		this.longitude = longitude;
		this.injuredNumber = injuredNumber;
		this.killedNumber = killedNumber;
		this.dangerIndex = dangerIndex;
	}

	@Override
	public String toString() {
		return "AnalyzedCrashDO [crashYear=" + crashYear + ", crashMonth=" + crashMonth + ", crashDay=" + crashDay
				+ ", latitude=" + latitude + ", longitude=" + longitude + ", injuredNumber=" + injuredNumber
				+ ", killedNumber=" + killedNumber + ", dangerIndex=" + dangerIndex + "]";
	}

	

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + crashDay;
		result = prime * result + crashMonth;
		result = prime * result + crashYear;
		long temp;
		temp = Double.doubleToLongBits(dangerIndex);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		result = prime * result + injuredNumber;
		result = prime * result + killedNumber;
		temp = Double.doubleToLongBits(latitude);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		temp = Double.doubleToLongBits(longitude);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		AnalyzedCrashDO other = (AnalyzedCrashDO) obj;
		if (crashDay != other.crashDay)
			return false;
		if (crashMonth != other.crashMonth)
			return false;
		if (crashYear != other.crashYear)
			return false;
		if (Double.doubleToLongBits(dangerIndex) != Double.doubleToLongBits(other.dangerIndex))
			return false;
		if (injuredNumber != other.injuredNumber)
			return false;
		if (killedNumber != other.killedNumber)
			return false;
		if (Double.doubleToLongBits(latitude) != Double.doubleToLongBits(other.latitude))
			return false;
		if (Double.doubleToLongBits(longitude) != Double.doubleToLongBits(other.longitude))
			return false;
		return true;
	}

	/**
	 * @return the crashYear
	 */
	public int getCrashYear() {
		return crashYear;
	}

	/**
	 * @param crashYear the crashYear to set
	 */
	public void setCrashYear(int crashYear) {
		this.crashYear = crashYear;
	}

	/**
	 * @return the crashMonth
	 */
	public int getCrashMonth() {
		return crashMonth;
	}

	/**
	 * @param crashMonth the crashMonth to set
	 */
	public void setCrashMonth(int crashMonth) {
		this.crashMonth = crashMonth;
	}

	/**
	 * @return the crashDay
	 */
	public int getCrashDay() {
		return crashDay;
	}

	/**
	 * @param crashDay the crashDay to set
	 */
	public void setCrashDay(int crashDay) {
		this.crashDay = crashDay;
	}

	

	/**
	 * @return the latitude
	 */
	public double getLatitude() {
		return latitude;
	}

	/**
	 * @param latitude the latitude to set
	 */
	public void setLatitude(double latitude) {
		this.latitude = latitude;
	}

	/**
	 * @return the longitude
	 */
	public double getLongitude() {
		return longitude;
	}

	/**
	 * @param longitude the longitude to set
	 */
	public void setLongitude(double longitude) {
		this.longitude = longitude;
	}

	/**
	 * @return the injuredNumber
	 */
	public int getInjuredNumber() {
		return injuredNumber;
	}

	/**
	 * @param injuredNumber the injuredNumber to set
	 */
	public void setInjuredNumber(int injuredNumber) {
		this.injuredNumber = injuredNumber;
	}

	/**
	 * @return the killedNumber
	 */
	public int getKilledNumber() {
		return killedNumber;
	}

	/**
	 * @param killedNumber the killedNumber to set
	 */
	public void setKilledNumber(int killedNumber) {
		this.killedNumber = killedNumber;
	}

	/**
	 * @return the dangerIndex
	 */
	public double getDangerIndex() {
		return dangerIndex;
	}

	/**
	 * @param dangerIndex the dangerIndex to set
	 */
	public void setDangerIndex(double dangerIndex) {
		this.dangerIndex = dangerIndex;
	}
	
	
}
